<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.server.web.JsVersionUtil"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${projectName}</title>
<script type="text/javascript"
	src='<c:url value="/js/boot.js"></c:url>?v=<%=JsVersionUtil.CURRENT_VERSION%>'></script>
<link rel="stylesheet" type="text/css"
	href='<c:url value="/share/styles.css"></c:url>?v=<%=JsVersionUtil.CURRENT_VERSION%>' />
<style type="text/css">
body {
	height: 100%;
	width: 100%;
}

.showTitle {
	width: 100%;
	height: 20px;
	line-height: 20px;
	background-color: #E0FFFF;
	margin: 10px 0;
	margin-left: 10px;
	margin-right: 10px;
	border-left: 6px solid #fa9900;
	padding-left: 10px;
	font-weight: 600;
	font-size: 16px;
	font-family: "Microsoft YaHei", "微软雅黑", helvetica, arial, verdana,
		tahoma, sans-serif;
}

.content {
	height: 100%;
	margin-left: 50px;
	margin-right: 10%;
}

.content ul li {
	margin: 5px 5px;
	border: 1px solid;
	width: 100%;
	border: 0;
	border-bottom: 4px solid orange;
}

.titleTD {
	width: 80px;
	font-size: 14px;
	color: lightseagreen;
	font-weight: bold;
}

.valueTD {
	font-size: 14px;
}

.orgBgDiv {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	height: 100%;
	/* border:1px solid #ccc; */
	background-size: 100%;
}

.photoStyle {
	/* background-size: 105px 60px; */
	width: 100px;
	height: 65px;
	vertical-align: middle;
	margin-left: auto;
	margin-right: auto;
}

.orgNameStyle {
	color: #0b73bb;
	font-weight: bold;
	font-size: 16px;
	margin-left: 10px;
}

.orgNoStyle {
	color: red;
	font-size: 12px;
	margin-left: 20px;
}
/* .mini-splitter-border {
	height: 1000px;
} */
</style>
<script type="text/javascript">
	
</script>
</head>
<body>
	<div class="mini-toolbar"
		style="padding: 0px; border-width: 1px; border-bottom-width: 0px;">
		<table style="width: 100%;">
			<tr>
				<td id="titleTD"><div class="showTitle">企业列表</div></td>
				<td width="100px"><a
					class="mini-button" id="rebackBtn" plain="true" iconCls="icon-list"
					onclick="status1">返回列表</a></td>
				<td style="width: 80px; height: 100%;">
					<div class="pageStatContainer">
						<div id="pageStatBtn_list"
							class="pageStat pageStatList pageStatListPress">
							<p>1</p>
						</div>
						<div id="pageStatBtn_form" class="pageStat pageStatForm">
							<p>2</p>
						</div>
						<div id="pageStatBtn_split" class="pageStat pageStatSplit">
							<p>3</p>
						</div>
					</div>
				</td>
			</tr>
		</table>
	</div>
	<div id="splitterPan" class="mini-splitter"
		style="width: 100%; height: 100%;" handlerSize="0">
		<div id='panLeft' size="400" showCollapseButton="true"
			style="padding: 0px; height: 100%; width: 100%;">
			<div class="content" style="padding: 10px;">
				<ul class="" id="">
					<c:forEach items="${orgList}" var="m" varStatus="status">
						<li><table style="width: 100%; height: 65px;">
								<tr style="height: 20px;">
									<td style="width: 100px;" rowspan="4">
										<div class="orgBgDiv" style="border: 1px solid #ccc;">
											<a href="javascript:showDetail('${m.OrgNo}');"> <c:if test="${m.ImgUrl != null}">
													<img src="${m.ImgUrl}" id="" alt="" class="photoStyle" />
												</c:if> <c:if test="${m.ImgUrl == null}">
													<img src="<c:url value='/share/images/orgBg.jpg'></c:url>"
														id="" alt="" class="photoStyle" />
												</c:if>
											</a>
										</div>
									</td>
									<td class="orgNameStyle" colspan="4"><a class="aTagUnderLine" href="javascript:showDetail('${m.OrgNo}')" >${m.OrgName}</a> <span
										class="orgNoStyle">${m.OrgNo}</span></td>
								</tr>
								<tr style="height: 20px;">
									<td class="titleTD">招聘状态：</td>
									<td class="valueTD"><c:if test="${m.EmployState == 1}">
							正在招聘
						</c:if> <c:if test="${m.EmployState == 0}">
							暂无招聘
						</c:if></td>
									<td class="titleTD">招聘时间：</td>
									<td class="valueTD">${m.EmployTime}</td>
									<td class="titleTD">招聘链接：</td>
									<td class="valueTD" colspan="3"><a target="_blank"
										href="${m.EmployLinkUrl}">${m.EmployLink}</a></td>
								</tr>
								<tr style="">
									<td class="titleTD">公司介绍：</td>
									<td class="valueTD" colspan="9">${m.Content}...
										...&nbsp;&nbsp;<a href="javascript:showDetail('${m.OrgNo}')" >[查看更多]</a>
									</td>
								</tr>
							</table></li>
					</c:forEach>
				</ul>
			</div>
		</div>
		<div id="panRight" showCollapseButton="true" expanded="false"
			style="overflow: hidden;">
			<iframe id="detailPan" class="subPageFrame" frameborder="0">
			</iframe>
		</div>
	</div>

	<script type="text/javascript">
		mini.parse();
		mini_debugger = false;
		var isKeepStat3 = false;
		
		var splitpan = mini.get("splitterPan");

		function showDetail(orgNo) {
			status2();
			$('#detailPan').css('height', '100%').css('width', '100%').attr(
					'src', '<c:url value="/org/detail/" />' + orgNo);
		}
		
		$(function() {
			$(".pageStat").hover(function() {
				$(this).addClass("hoverStyle");
			}, function() {
				$(this).removeClass("hoverStyle");
			});
			$(".pageStat").click(
					function() {
						$this = $(this);
						var value = $this.find("p").first().html();
						if (value == 1) {
							splitpan.collapsePane(2);
							$this.addClass("pageStatListPress");
							$this.next().removeClass("pageStatFormPress")
									.next().removeClass("pageStatSplitPress");
							isKeepStat3 = false;
							status1Show();
						}
						if (value == 2) {
							splitpan.collapsePane(1);
							$this.addClass("pageStatFormPress");
							$this.prev().removeClass("pageStatListPress");
							$this.next().removeClass("pageStatSplitPress");
							isKeepStat3 = false;
							status2Show();
						}
						if (value == 3) {
							splitpan.expandPane(1);
							splitpan.expandPane(2);
							$this.addClass("pageStatSplitPress");
							$this.prev().removeClass("pageStatFormPress")
									.prev().removeClass("pageStatListPress");
							isKeepStat3 = true;
							status3Show();
						}
					});
			status1();
			$('.mini-splitter').css("height",'${orgCount}'*82+100+"px");
		});
		function status1() {
			if (!isKeepStat3) {
				$("#pageStatBtn_list").click();
			}
		}
		function status2() {
			if (!isKeepStat3) {
				$("#pageStatBtn_form").click();
			}
		}
		function status3() {
			$("#pageStatBtn_split").click();
		}
		function status1Show() {
			$('#titleTD').show();
			$('#rebackBtn').hide();
		}
		function status2Show() {
			$('#titleTD').hide();
			$('#rebackBtn').show();
		}
		function status3Show() {
			$('#titleTD').hide();
			$('#rebackBtn').hide();
		}
	</script>
</body>
</html>